package com.seckill.goods.task.statictask;

import com.dangdang.ddframe.job.api.ShardingContext;
import com.dangdang.ddframe.job.api.simple.SimpleJob;

import java.text.SimpleDateFormat;
import java.util.Date;

/**
 * @program: seckill-parent
 * @description: elastic-job执行任务的创建
 * @author: zhanghz001
 * @create: 2021-06-26 10:46
 **/
// @ElasticSimpleJob(
//         cron = "5/10 * * * * ?",
//         jobName = "updateTask",
//         shardingTotalCount = 2)
// @Component
public class ZhzStaticJob implements SimpleJob {
    @Override
    public void execute(ShardingContext shardingContext) {
        SimpleDateFormat sdf = new SimpleDateFormat("yyy-MM-dd HH:mm:ss");
        System.out.println(sdf.format(new Date()));
    }
}
